﻿<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Groups.aspx.vb" Inherits="Training.Groups" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Training - Training:: Manage Groups</title>
<link rel="Stylesheet" type="text/css" media="screen" href="../css/adminStyle.css" />
</head>
<body>
    <form id="form1" runat="server">
    <div class="ctr">
        <h2>Manage Groups</h2>
        
        <div style="width:750px;text-align:left;margin:0 auto;" class="text">
            <asp:GridView ID="gvGroups" runat="server" AllowPaging="True" 
                AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="GroupID" 
                DataSourceID="dsGroups" Width="100%">
                <RowStyle CssClass="row1" />
                <EmptyDataRowStyle CssClass="row1" />
                <Columns>
                    <asp:BoundField DataField="GroupID" HeaderText="GroupID" InsertVisible="False" 
                        ReadOnly="True" SortExpression="GroupID">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="GroupName" HeaderText="GroupName" 
                        SortExpression="GroupName">
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="LoginName" HeaderText="Login Name" 
                        SortExpression="LoginName">
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:BoundField DataField="CreatedDate" HeaderText="CreatedDate" 
                        SortExpression="CreatedDate">
                    <HeaderStyle HorizontalAlign="Left" />
                    <ItemStyle HorizontalAlign="Left" />
                    </asp:BoundField>
                    <asp:HyperLinkField DataNavigateUrlFields="GroupID,GroupName" 
                        DataNavigateUrlFormatString="DeleteGroup.aspx?gid={0}&amp;nm={1}" 
                        HeaderText="Delete Group" Text="delete">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                    <asp:HyperLinkField DataNavigateUrlFields="GroupID,GroupName" 
                        DataNavigateUrlFormatString="EditGroup.aspx?gid={0}&amp;gnm={1}" 
                        HeaderText="Edit Group" Text="edit">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                    <asp:HyperLinkField DataNavigateUrlFields="GroupID,GroupName" 
                        DataNavigateUrlFormatString="DisableGroup.aspx?gid={0}&amp;nm={1}" 
                        HeaderText="Restrict Login" Text="edit">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                    <asp:HyperLinkField DataNavigateUrlFields="GroupID,GroupName" 
                        DataNavigateUrlFormatString="GroupTraining.aspx?gid={0}&amp;nm={1}" HeaderText="Training" 
                        Text="edit">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                    <asp:HyperLinkField DataNavigateUrlFields="GroupID,GroupName" 
                        DataNavigateUrlFormatString="ChangeGroupPassword.aspx?gid={0}&amp;nm={1}" 
                        HeaderText="Change Password" Text="change">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                    <asp:HyperLinkField DataNavigateUrlFields="GroupID,GroupName" 
                        DataNavigateUrlFormatString="PurgeUserResults.aspx?gid={0}&amp;nm={1}" 
                        HeaderText="Delete User Results" Text="delete">
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Center" />
                    </asp:HyperLinkField>
                </Columns>
                <PagerStyle CssClass="small" />
                <HeaderStyle CssClass="rowHead" ForeColor="White" />
                <AlternatingRowStyle CssClass="row2" />
            </asp:GridView>
        </div>
        
        <br />
        <p><a href="Default.aspx">Admin Main</a></p>
    </div>
    
    <asp:SqlDataSource ID="dsGroups" runat="server" 
        ConnectionString="<%$ ConnectionStrings:Conn %>" 
        SelectCommand="proc_GetGroupsWithLogins" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
    </form>
</body>
</html>
